package com.example.tianyidemo.Mapper;

import com.example.tianyidemo.pojo.Housre;
import com.example.tianyidemo.pojo.Post;
import com.example.tianyidemo.pojo.User;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SelectUserisMapper {

   @Select("select * from user ")
    List<User> getuserList();
    @Select("select * from user where userName like concat('%' #{user_name} '%')")
    List<User> Selectuser(String user_name);
 @Select("select * from post where postTitle like concat('%' #{user_name} '%')")
 List<Post> Selectusers(String user_name);

    //    删除用户
    @Delete("delete from user where userID = #{userId}")
    int delectuser(Integer userId);
}
